<template>
  <div>
    <Header :items='this.items'/>
      <Nuxt />
    <Footer />
  </div>
</template>

<script>
import Header from '~/components/Header'
import Footer from '~/components/Footer'

export default {
  name: 'default',
  components: { Footer, Header },
  data(){
    return {
      items: []
    }
  },
  async created() {
    await this.getAllCategory()
  },
  methods:{
    async getAllCategory(){
      let res = await this.$axios.$get("/category")
      this.items = res.data
    }
  }
}
</script>

<style scoped>

</style>
